import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { h } from 'vue';
import { Switch } from 'ant-design-vue';
import { setRoleStatus } from '/@/api/demo/system';
import { useMessage } from '/@/hooks/web/useMessage';

export const columns: BasicColumn[] = [
  {
    title: '角色名称',
    dataIndex: 'name',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '角色名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'name',
    label: '角色名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'IsDefault',
    label: '默认',
    component: 'Checkbox',
    defaultValue: false,
    show: false,
  },
  {
    field: 'IsPublic',
    label: '公开',
    component: 'Checkbox',
    defaultValue: true,
  },
];

export const role_nav_columns: BasicColumn[] = [
  {
    title: '菜单名称',
    dataIndex: 'name',
    width: 200,
  },
  {
    title: '菜单操作',
    dataIndex: 'actions',
    slots: { customRender: 'actionsCell' },
  },
];
